package com.patrol.logisticsmanage.ui.equip;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.patrol.logisticsmanage.R;
import com.patrol.logisticsmanage.ui.base.BaseActivity;
import com.patrol.logisticsmanage.ui.base.DialogHelper;
import com.patrol.logisticsmanage.ui.todo.ToDoAdapter;

import butterknife.BindView;
import butterknife.ButterKnife;

@Route(path = "/app/EquipDetailActivity")
public class EquipDetailActivity extends BaseActivity {

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rcy_equip_detail)
    RecyclerView rcyEquipDetail;

    EquipDetailAdapter equipDetailAdapter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_equip_detail);
        ButterKnife.bind(this);

        tvTitle.setText("领取记录");
        rcyEquipDetail.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.VERTICAL,false));
        equipDetailAdapter = new EquipDetailAdapter(this);
        rcyEquipDetail.setAdapter(equipDetailAdapter);
        equipDetailAdapter.setOnItemClickListener(new ToDoAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(View v, int position) {
                DialogHelper.showEditDialog(mContext,"请输入退换原因", new DialogHelper.DialogListenerContent() {
                    @Override
                    public void handleMessage(String... password) {

                    }
                });
            }
        });
    }
}
